package com.cyy.builder_pattern;

/**
 * 神医豆豆
 */
public class DouDou {
    //方法私有丹方属性“丹炉”
    private final DanFang danlu;

    public DouDou(DanFang danlu) {
        this.danlu = danlu;
    }

    //炼丹方法"lian练"
    public Dan lian(){
        //放入材料
        danlu.name();
        //释放丹火
        danlu.xiaoguo();
        //成丹
        return danlu.getDan();
    }
}
